<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
    	$basics = D('Basic')->select();
		if($basics['status']==0){
			$this->display('fixed');exit;
		}
//		首页大图
		$topBanners = D('PositionContent')->select(array('status'=>1,'position_id'=>2),4);
//		推荐6篇文章		
		$newslist = D('News')->select(array('status'=>1),6);
		$catid = array('id'=>0);
		$this->assign('topbanner',$topBanners);
		$this->assign('newslist',$newslist);
		$this->assign('catid',$catid);
        $this->display();
    }
	
	public function fixed (){
		
		$this->display();
	}
}